Documents can be described by using an extensible markup language (“XML”). Such documents may be termed XML documents and described in a hierarchical manner. A hierarchical document may need to be manipulated to add, remove, or modify portions of the document. Such manipulations may be performed in a variety of ways including directly by modifying XML “tags” that describe the document or programmatically by using a Document Object Model (“DOM”).
The DOM is an application programming interface (“API”) specification established by the World Wide Web Consortium (“W3C”). The W3C defines the DOM as “a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of documents.” The World Wide Web consortium's (“W3C”) web site, w3c.org, provides a DOM specification. The DOM presents a programming interface for well-formed XML documents, including valid HTML, and defines how to manipulate a Document Object, such as an XML document. Using the DOM, a software program can, e.g., create a document, navigate its structure, and add, retrieve, modify, or delete its contents.
The DOM presents a tree view of the XML document. An XML tree comprises “elements” in which the “documentElement” is the top-level element of the tree. The documentElement may have one or more “childNodes” that represent the branches of the tree. A software program may use the DOM's Node Interface to read and write elements in the XML tree. As an example, the following VBScript code uses the DOM to traverse nodes of an XML document and write the nodeValue of each element that is a child of the documentElement:
for each x in xmlDoc.documentElement.childNodesdocument.write(x.nodeName)document.write(“: ”)document.write(x.nodeValue)next
A tree representation of a hierarchical document appears in FIG. 1. The following is an XML representation of the unshaded elements of the hierarchical document illustrated in FIG. 1:
<library text=“Seattle”><floor text = “1”><shelf text = “A”><book text = “Romeo and Juliet”/><book text = “Macbeth”/></shelf></floor></library>
FIG. 2 illustrates the relationship between DOM modules as defined by the W3C and the interfaces available for working with documents.
The DOM defines objects, methods, properties, and events. As an example, the DOM defines a “Document” object that has a “getElementById” method. An example property of an object is “nodeValue” and an example event is “DOMNodeInserted.” One skilled in the art will understand that an object model such as the DOM would have multiple objects, methods, properties, and events, and would further understand what they are used for and how they interrelate. The remainder of this specification assumes a baseline understanding of the current XML and DOM art beyond what is described above. This baseline is defined by the W3C DOM specifications, which include Document Object Model (DOM) Level 2 Core Specification Version 1.0 (W3C Recommendation Nov. 13, 2000), Document Object Model (DOM) Level 2 Events Specification Version 1.0 (W3C Recommendation Nov. 13, 2000), Document Object Model (DOM) Level 2 HTML Specification Version 1.0 (W3C Recommendation Jan. 9, 2003), Document Object Model (DOM) Level 2 Style Specification Version 1.0 (W3C Recommendation Nov. 13, 2000), Document Object Model (DOM) Level 2 Views Specification Version 1.0 (W3 C Recommendation, Nov. 13, 2000), and Document Object Model (DOM) Level 2 Traversal and Range Specification Version 1.0 (W3C Recommendation Nov. 13, 2000). These specifications are available at the W3C's web site (last visited Oct. 1, 2003) and are all hereby incorporated herein by reference.
Authors sometimes work together when collaborating on a single document, such as presentation slide decks, books, or research papers. When the authors are working simultaneously on a document, they may want to see mutations (e.g., additions, deletions, updates, or other changes) made by other authors as soon as those mutations are made. The W3C DOM specification does not, however, provide a mechanism for multiple people or software programs to work collaboratively on a single XML document. The W3C DOM specification also does not provide a mechanism for people working on different computers to work on the same XML document simultaneously.